#ifndef ERRORCODE_P_H
#define ERRORCODE_P_H

#include <QMap>
#include <QObject>

struct ErrorInfo
{
    int errorCode;
    QString errorMsg;
    QString tipMsg;
};

static const QMap<QString, ErrorInfo> errorCodeMapper =
{
    {"DETECT01", {0x8001, QObject::tr("High Power Error"),             QObject::tr("Please Contact Engineer")}},
    {"DETECT02", {0x8002, QObject::tr("IGBT Error"),                   QObject::tr("Please Contact Engineer")}},
    {"DETECT03", {0x8003, QObject::tr("IGBT Control Error"),           QObject::tr("Please Contact Engineer")}},
    {"DETECT04", {0x8004, QObject::tr("Fuse Error"),                   QObject::tr("Please Contact Engineer Replace the Fuse")}},
    {"DETECT05", {0x8005, QObject::tr("Power Discharge Error"),        QObject::tr("Please Contact Engineer")}},
    {"DETECT06", {0x8006, QObject::tr("Wing Motor Error"),             QObject::tr("Please Contact Engineer")}},
    {"DETECT07", {0x8007, QObject::tr("Rotary Motor Error"),           QObject::tr("Please Contact Engineer")}},
    {"DETECT08", {0x8008, QObject::tr("Rotary Motor not Calibration"), QObject::tr("Please Contact Engineer")}},
    {"DETECT09", {0x8009, QObject::tr("Electrode Disconnected"),       QObject::tr("Please Contact Engineer")}},

    {"SHOCHK01", {0x8011, QObject::tr("High Power Error"),             QObject::tr("Please Contact Engineer")}},
    {"SHOCHK02", {0x8012, QObject::tr("IGBT Error"),                   QObject::tr("Please Contact Engineer")}},
    {"SHOCHK03", {0x8013, QObject::tr("IGBT Control Error"),           QObject::tr("Please Contact Engineer")}},
    {"SHOCHK04", {0x8014, QObject::tr("Fuse Error"),                   QObject::tr("Please Contact Engineer Replace the Fuse")}},
    {"SHOCHK05", {0x8015, QObject::tr("Electrode not Assembled"),      QObject::tr("Please Assemble the Electrodes")}},
    {"SHOCHK06", {0x8016, QObject::tr("Electrode Used"),               QObject::tr("Please Replace the Electrode")}},
    {"SHOCHK11", {0x8017, QObject::tr("Electrode 1# Error"),           QObject::tr("Please Replace the Electrode")}},
    {"SHOCHK21", {0x8018, QObject::tr("Electrode 2# Error"),           QObject::tr("Please Replace the Electrode")}},
    {"SHOCHK31", {0x8019, QObject::tr("Electrode 3# Error"),           QObject::tr("Please Replace the Electrode")}},

    {"HP2STR01", {0x8020, QObject::tr("Shock Overcurrent Error"),      QObject::tr("Please Modify Parameters or Replace Sample & Restart")}},
    {"HP2STR02", {0x8021, QObject::tr("Shock Detect Error"),           QObject::tr("Please Contact Engineer")}},

    {"HP2STR03", {0x8022, QObject::tr("Liquid Detection Timeout"),     QObject::tr("Make Sure the Consumables is installed correctly and Click 'continue'")}},
    {"HP2STR04", {0x8023, QObject::tr("Electrode Disconnected"),       QObject::tr("Please Replace the Electrode & Restart")}},
    {"HP2STR05", {0x8024, QObject::tr("Rotary Motor Location Error"),  QObject::tr("Please Contact Engineer")}},
    {"HP2STR06", {0x8025, QObject::tr("Level Sensor Error"),           QObject::tr("Please Contact Engineer")}},

    {"PWRCHK1", {0x8031, QObject::tr("High Power Error"),              QObject::tr("Please Contact Engineer")}},
    {"PWRCHK2", {0x8032, QObject::tr("IGBT Error"),                    QObject::tr("Please Contact Engineer")}},
    {"PWRCHK3", {0x8033, QObject::tr("IGBT Control Error"),            QObject::tr("Please Contact Engineer")}},
    {"PWRCHK4", {0x8034, QObject::tr("Fuse Error"),                    QObject::tr("Please Contact Engineer Replace the Fuse")}},

    {"FLWCHK4", {0x8041, QObject::tr("Liquid Detection Timeout"),      QObject::tr("Please Check the Consumables is used or installed correctly")}},
};

#endif // ERRORCODE_P_H
